/*定义枚举类，包含有各种日志等级，还提供转换接口，将日志等级转换为对应的字符串*/
#ifndef _N_LEVEL_H_
#define _N_LEVEL_H_
namespace bitlog
{
    class Level
    {
        public:
        enum class value
        {
            UNKNOWN=0,//六种日志等级
            DEBUG,
            INFO,
            WARN,
            ERROR,
            FATAL,
            OFF,
        };
        static const char *changestring(Level::value level)
        {
            switch(level)
            {
                case Level::value::DEBUG: return "DEBUG";
                case Level::value::INFO: return "INFO";
                case Level::value::WARN: return "WARN";
                case Level::value::ERROR: return "ERROR";
                case Level::value::FATAL: return "FATAL";
                 case Level::value::OFF: return "OFF";
            }
            return "UNKNOWN";
        }
    };

}

#endif